/**
 * 
 */
package br.com.estrategos.utils;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import br.com.estrategos.configuracoes.Constantes;



/**
 * @author x12259401
 *
 */
public class DAOBasic {

	/**
	 * 
	 */
	private EntityManagerFactory factory;
	private EntityManager manager;
	
	//Banco de dados
	private String entidade;
	
	/**
	 * 
	 */
	public DAOBasic() {
		// TODO Auto-generated constructor stub
		this.setFactory(Persistence.createEntityManagerFactory(Constantes.DATABASE_SYS));
		this.setManager(factory.createEntityManager());
	}

	
	
	public EntityManagerFactory getFactory() {
		return factory;
	}

	public void setFactory(EntityManagerFactory factory) {
		this.factory = factory;
	}

	public EntityManager getManager() {
		return manager;
	}

	public void setManager(EntityManager manager) {
		this.manager = manager;
	}

	public String getEntidade() {
		return entidade;
	}

	public void setEntidade(String entidade) {
		this.entidade = entidade;
	}
}
